<?php

require_once('PHPUnit/Autoload.php');

include_once(dirname(__FILE__) . "/start.php");

class googleMapsTest extends PHPUnit_Framework_TestCase
{
		   
	public function testGoodAddress()
    {    	
    	$location = getLocationFromAddress("simbron 3008 villa del parque argentina");
    	
        $this->assertGreaterThanOrEqual($location['lat'], -34.5);
        $this->assertLessThanOrEqual($location['lat'], -34.7);
        
        $this->assertGreaterThanOrEqual($location['lng'], -58.4);
        $this->assertLessThanOrEqual($location['lng'], -58.6);
        
    }
    
	public function testBadAddress()
    {
        $location = getLocationFromAddress("lalalalaalla");  
        $this->assertFalse($location);
    }
    
}
?>
